package marmalius;

public class Objects {
	
	//gestion des banques
	
	private final int id_bank[] = {
		2213, 11338
	};
	
	public boolean is_bank (int id) {
		for (int i = 0; i <= id_bank.length-1; i++) {
			if (id_bank[i] == id) {
				return true;
			}
		}
		return false;
	}
	
	//gestion des portails (tp)
	
	private final int maxPortails = 100;
	private int portails[][] = new int[maxPortails][8];
	
	private final int id_portail[] = {
		2467, 2469, 2470, 2474, 2475, 2477,
		4151, 
		6551, 
		7319, 7273, 7288, 7325
	};
	
	public boolean is_portail (int id) {
		for (int i = 0; i <= id_portail.length-1; i++) {
			if (id_portail[i] == id) {
				return true;
			}
		}
		return false;
	}
	
	public void addPortail (int id, int x1, int y1, int h1, int x2, int y2, int h2, int type) {
		for (int a = 0; a < maxPortails; a++) {
			if (portails[a][0] == -1) {
				portails[a][0] = id;
				portails[a][1] = x1;
				portails[a][2] = y1;
				portails[a][3] = h1;
				portails[a][4] = x2;
				portails[a][5] = y2;
				portails[a][6] = h2;
				portails[a][7] = type;
				a = maxPortails;
			}
		}
	}
	
	public int rportail (int a, int b) {
		return portails[a][b];
	}
	
}
